package com.evidencer.java.utils;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;


public class Printer {
	public static void sop(Object o,String s){
		if(o==null){
		sop(s+"--> "+o+"\r\n");
		}
		else{
		sop(s+"--> "+o.toString()+"\r\n");
		}
	}
	
	public static void sop(String s){
		System.out.println(s.toString());
	}
	
	public static void sop(){
		System.out.println();
	}
	
	/**
	 * @param al
	 */
	public static <T> void printCollection(Collection<T> al) {
		Iterator<T> it=al.iterator();
		
		while(it.hasNext()){
			T t=it.next();
			System.out.println("it.next()="+t);
		}
	}

	/**
	 * @param map
	 */
	public static <K,V>void printMap(Map<K, V> map) {
		Iterator<K> it=map.keySet().iterator();
		while(it.hasNext()){
			K key=it.next();
			V value=map.get(key);
			System.out.println("Key="+key+"::"+"Value="+value);
		}
	}
	
}
